<?php
/**
 * User:于小涛
 * Date:2020/2/16
 * Time:17:12
 */
namespace app\admin\model\system;
use think\Model;

class Config extends Model{
    protected $name='config';

    public function editByKey($str_key,$str_content){
        $str_time=date("Y-m-d H:i:s");
        $arr_edit=[
            'content'=>$str_content,
            'modify_time'=>date("Y-m-d H:i:s"),
        ];
        $arr_edit['modify_time'] = $str_time;
        return $this->where('key',$str_key)->update($arr_edit);
    }
}